<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
	<table>

		<c:forEach items="${sessionScope.cart.cartItems }" var="cartItems">
			<div>
				<a>${cartItems.product.pname}</a>
				<form action="/removeCart" method="get">
				<input type="hidden" name="pid" value="${cartItems.product.pid}" />
					<button>删除商品</button>
				</form>
				<form action="/saveOrder" method="post">
				
					<button id="submit">提交订单</button>
				</form>
			</div>
		</c:forEach>
		</tbody>
	</table>
	<form action="/clearCart" method="get">
		<button>清空购物车</button>
	</form>

</body>
</html>